package ClassOOR;

import java.util.Scanner;

/**
 * @author Jimmy
 * @date 2022/11/10 - 15:22
 */
public class TimesCircleTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Input the time: ");
        int time = sc.nextInt();
        Circle1 c = new Circle1();
        PassObject test = new PassObject();
        test.printAreas(c, time);
        System.out.println("Now the radius is: " + c.radius);
    }
}

class Circle1{
    double radius;
    public double findArea(){
        return Math.PI * radius * radius;
    }
}

class PassObject{
    public void printAreas(Circle1 c, int time){
        System.out.println("Radius: \t\t" + "Area");
        for (int i = 1; i <= time; i++) {
            c.radius = i;
            System.out.println(c.radius + "\t\t" + c.findArea());
        }
        c.radius = time + 1;
    }
}

